﻿@model PaymentEBank
@{var dic = ViewBag.Banks as IDictionary<int, string>;}
<div class="page">
    <div class="pageContent">
        <form method="post" action="/payment/ebank/@(Model.Id)?platformId=@(ViewBag.PlatformId)" class="pageForm required-validate" onsubmit="return validateCallback(this, dialogAjaxDone);">
        <div class="pageFormContent">
            <div>
                <p>
                    <label>
                        状 态：
                    </label>
                    <select name="status">
                        <option value="True" @(Model.Status ? "selected=selected" : string.Empty)>可用</option>
                        <option value="False" @(!Model.Status ? "selected=selected" : string.Empty)>不可用</option>
                    </select>
                </p>
                <p>
                    <label>
                        银 行：
                    </label>
                    @if (Model.Id == 0)
                    {
                        if (dic != null && dic.Count > 0)
                        {
                        <select name="BankId">
                            @foreach (var o in dic)
                            {
                                <option value="@o.Key">@o.Value</option>
                            }
                        </select>
                        }
                        else
                        {
                        <label>
                            请先添加可用银行
                        </label>
                        }
                    }
                    else
                    {
                        <label>
                            @(Model.Bank != null ? Model.Bank.Name : string.Empty)
                        </label>
                    }
                </p>
                <p>
                    <label>
                        网关编码：
                    </label>
                    <input type="text" name="GatewayCode" value="@(Model.GatewayCode)" class="required"/>
                </p>
                <p>
                    <label>
                        顺 序：
                    </label>
                    <input type="text" name="DisplayOrder" value="@(Model.DisplayOrder)" class="required digits"/>
                </p>
                <p>
                    <label>
                        描 述：
                    </label>
                    <input type="text" name="Description" value="@(Model.Description)"/>
                </p>
            </div>
        </div>
        <div class="formBar">
            <ul>
                @if (dic != null && dic.Count > 0)
                {
                    <li>
                        <div class="buttonActive">
                            <div class="buttonContent">
                                <button type="button" onclick="this.form.onsubmit();">
                                    保存</button></div>
                        </div>
                    </li>
                }
                <li>
                    <div class="button">
                        <div class="buttonContent">
                            <button type="button" onclick="$.pdialog.closeCurrent();">
                                取消</button></div>
                    </div>
                </li>
            </ul>
        </div>
        </form>
    </div>
</div>
